const Tree = {
    "id": "root",
    "children": [
        {
            "id": "a",
            "children": [
                {
                    "id": "b,
                    "children": [
                        {
                            "id": "c",
                            "children": []
                        }
                    ]
                }
            ]
        },
        {
            "id": "e",
            "children": []
        }
    ]
};

const getNode=id=>{
    
};

const getTree=(tree=Tree,id='root')=>{
    let node=tree[id]?{id,children:tree[id].children||[]}:null;

};

console.log(JSON.stringify(getTree(Tree,'root'),null,2));
